import { getBaseURL, get, post, deletes } from "./request";

const HttpManager = {
    //获取banner()信息
    getBanner:(data)=>get(`/banner?type=${data.type}`),
    //获取<新歌速递>
    getNewSong:(data)=>get(`/top/song?type=${data.type}`),
    //获取每日推荐歌单(未登录)
    getRecommendMusicMenu:(data)=>get(`/personalized?limit=${data.limit}`),
    //获取每日最新MV
    getNewMV:(data)=>get(`/mv/first?limit=${data.limit}`),
    //获取音乐url
    getMusicUrl:(data)=>get(`/song/url?id=${data.id}`),
    //获取生成登陆二维码需要的key
    getQRCodeKey:()=>get(`/login/qr/key`),
    //生成登录二维码
    getQRCode:(data)=>get(`/login/qr/create?key=${data.key}&qrimg=${data.qrimg}`),
    //账号密码登录
    accountLogin:(data) => post(`/login/cellphone`,data),
    //退出登录
    logout:() => get(`/logout`),
    //获取登录状态
    getLoginState:() => get(`/login/status`),
    //获取用户播放记录
    getUserRecord:(data) => get(`/user/record?uid=${data.uid}&type=${data.type}`),
    //获取用户歌单
    getUserPlayList:(data) => get(`/user/playlist?uid=${data.uid}`),
    //获取歌单歌曲
    getPlayListSong:(data) => get(`/playlist/track/all?id=${data.id}`),
    //获取用户详情(登陆后调用)
    getUserDetail:(data) => get(`/user/detail?uid=${data.uid}`),
    //获取歌手信息
    getSingerList:(data) => get(`/artist/list?type=${data.type}&area=${data.area}&initial=${data.initial}`),
    //获取歌手详情
    getSingerDetail:(data) => get(`/artist/detail?id=${data.id}`),
    //获取歌手热门歌曲
    getSingerTopSong:(data) => get(`/artist/top/song?id=${data.id}`),
    //获取歌手专辑
    getSingerAlbum:(data) => get(`/artist/album?id=${data.id}&limit=${data.limit}`),
    //获取歌手MV
    getSingerMV:(data) => get(`/artist/mv?id=${data.id}`),
    //获取mv详情
    getmvDetail:(data) => get(`/mv/detail?mvid=${data.mvid}`),
    //获取mvSrc
    getmvSrc:(data) => get(`/mv/url?id=${data.id}`),
    //获取相似mv
    getSimiMv:(data) => get(`/simi/mv?mvid=${data.id}`),
};

export { HttpManager }